<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改从PCA挑选的接近的模型')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-SelectModelFromPca-edit" th:object="${selectModelFromPca}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-2 control-label">代码：</label>
                <div class="col-sm-3">
                    <input name="symbol" th:field="*{symbol}" class="form-control" type="text">
                </div>
                <label class="col-sm-2 control-label">名称：</label>
                <div class="col-sm-3">
                    <input name="name" th:field="*{name}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-2 control-label">触发日期：</label>
                <div class="col-sm-3">
                    <div class="input-group date">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        <input name="datetime" th:value="${#dates.format(selectModelFromPca.datetime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                    </div>
                </div>
                <label class="col-sm-2 control-label">类型：</label>
                <div class="col-sm-3">
                    <select name="type" class="form-control m-b" th:with="type=${@dict.getType('stockTrendType')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-2 control-label">是否符合模型：</label>
                <div class="col-sm-3">
                    <input name="fitTheBill" th:field="*{fitTheBill}" class="form-control" type="text">
                </div>
                <label class="col-sm-2 control-label">是否机器添加：</label>
                <div class="col-sm-3">
                    <input name="aiAuto" th:field="*{aiAuto}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-2 control-label">是否训练集：</label>
                <div class="col-sm-3">
                    <input name="isTrain" th:field="*{isTrain}" class="form-control" type="text" value="1">
                </div>
            </div>
        </form>
    </div>
    <div class="wrapper wrapper-content" id="main">
        <div id='div_id' style='width:800px;height:400px;'></div>
    </div>

    <script th:src="@{/js/echarts.min.js}"></script>
    <script th:src="@{/js/stock_fasttext_train_only_closeprice.js}"></script>

    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script type="text/javascript">
        var prefix = ctx + "stock2/SelectModelFromPca";
        $("#form-SelectModelFromPca-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-SelectModelFromPca-edit').serialize());
            }
        }

        $("input[name='datetime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        foretellGetFun($(" input[ name='symbol' ] ").val(), 'div_id', $(" input[ name='datetime' ] ").val());

    </script>
</body>
</html>